package cn.sdormitory.component.bindValue.query.mapping;


import cn.sdormitory.component.bindValue.bean.info.BindInfo;
import cn.sdormitory.sys.service.SysDictDetailService;
import com.google.common.collect.Table;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Component("dictMappingQuery")
public class DictMappingQuery implements MappingQuery{

    @Resource
    private SysDictDetailService dictDetailService;

    @Override
    public Map<String, String> getMapping(BindInfo bindInfo, List<String> variables, Table<String, String, String> params) {
        return dictDetailService.getDictValueLableMap(bindInfo.getKey());
    }
}
